<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		// 给定两个大小分别为 m 和 n 的正序（从小到大）数组 nums1 和 nums2。请你找出并返回这两个正序数组的 中位数 。
		
		
		onLoad() {
			let nums1 = [2]
			let nums2 = [0]
			let s = 'cbbd'
			let res = this.longestPalindrome(s)
			console.log(res)
		},
		methods: {
			longestPalindrome(s) {
				let map = new Set()
				let num = s.length
				let rsk = 0,res=0
				for(let i = 0;i<num;++i){
					// console.log(s.charAt(i))
					if(i != 0) {
						map.delete(i - rsk)
					}
					
					while( rsk < num && map.has(s.charAt(rsk))){
						// map.add(s.charAt(rsk));
						++rsk
					}
					map.add(s.charAt(rsk));
					// console.log(map)
					res = map
				}
				return res
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
